import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Reverse {
    public static void main(String[] args) {
        // try {
        //     FileWriter fileWriter = new FileWriter("reverse.txt");
        //     fileWriter.write('0');
        //     fileWriter.close();
        // } catch (IOException e) {
        //     e.printStackTrace();
        // }

        try {
            FileReader fileReader = new FileReader("reverse.txt");
            int i = fileReader.read();
            fileReader.close();

            System.out.println(i);
            System.out.println((char) i);

            System.out.println(~i);
            System.out.println((char) ~i);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
